using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BasketTriggerHandler : MonoBehaviour
{
    public Basket BasketObject { set; private get; }
    // Start is called before the first frame update
    void Start()
    {
    }

    // Update is called once per frame
    void Update()
    {

    }

    private void OnTriggerEnter(Collider other)
    {
        GameObject selfObject = this.gameObject;
        // 通知 BasketObject 触发了 1次
        if (selfObject.name == "ContactOne")
        {
            BasketObject.setContactTimePlus(1);
        }
        // 触发了 2次
        else if (selfObject.name == "ContactTwo")
        {
            BasketObject.setContactTimePlus(2);
        }
        Debug.Log($"entered {selfObject.name}");
    }
}
